Reduce "start-up" time for tasks in LocalExecutor#11327
Merged
ashb merged 1 commit intoapache:masterfrom Oct 8, 2020
Merged
Conversation
turbaszek
reviewed
Oct 7, 2020
kaxil
reviewed
Oct 7, 2020
kaxil
approved these changes
Oct 7, 2020
Member
Author
Member
Author
|
I was thinking I'd follow up with a separate PR to add the same to CeleryExecutor. |
kaxil
reviewed
Oct 7, 2020
kaxil
approved these changes
Oct 7, 2020
turbaszek
approved these changes
Oct 7, 2020
Member
Author
|
I just noticed that we still need a fork in here - |
ashb
commented
Oct 7, 2020
kaxil
reviewed
Oct 7, 2020
cddc189 to
af20de4
Compare
Member
Author
|
Updated benchmarks -- the fork is basically free. |
kaxil
approved these changes
Oct 8, 2020
Member
Author
|
Hmmm, something broken in all the kube test unrelated to this. |
Spawning a whole new python process and then re-loading all of Airflow is expensive. All though this time fades to insignificance for long running tasks, this delay gives a "bad" experience for new users when they are just trying out Airflow for the first time. For the LocalExecutor this cuts the "queued time" down from 1.5s to 0.1s on average.
af20de4 to
3429c2d
Compare
Member
Author
|
Oh, those kube tests will fail because I haven't re-triggered the image build. If the rests of the tests pass I'll merge this. |
ashb
added a commit
to astronomer/airflow
that referenced
this pull request
Oct 9, 2020
This is similar to apache#11327, but for Celery this time. The impact is not quite as pronounced here (for simple dags at least) but takes the average queued to start delay from 1.5s to 0.4s
ashb
added a commit
that referenced
this pull request
Oct 9, 2020
This is similar to #11327, but for Celery this time. The impact is not quite as pronounced here (for simple dags at least) but takes the average queued to start delay from 1.5s to 0.4s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Spawning a whole new python process and then re-loading all of Airflow
is expensive. All though this time fades to insignificance for long
running tasks, this delay gives a "bad" experience for new users when
they are just trying out Airflow for the first time.
For the LocalExecutor this cuts the "queued time" down from 1.5s to 0.1s
on average.
Data on this for a simple 10-task sequential DAG:
This was discovered in my general benchmarking and profiling of the scheduler for AIP-15, but it's not tied to any of that work. There are more of these kind of improvements coming, each unrelated but all add up.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.